/*

* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Smart-Shop开源商城系统/ Java商城-首选电商平台系统 请务必保留此注释头信息
* |     开源地址: https://gitee.com/ningbo-qishan/gruul-mall
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     可正常分享和学习源码,未经授权 不可商用！
* |     商业版中台购买/开源版商业授权 联系技术客服
* |     官网:  https://www.73app.cn/
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Copyright (c) 2016-2999 宁波启山智软科技有限公司
* |     版权所有 ,侵权必究！
* ------------------------------------------------------------------------

*/
package com.medusa.gruul.integral.api.entity;

import java.io.Serializable;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 积分订单表
 * </p>
 *
 * @author xiaoq
 * @since 2019-11-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_integral_order")
@ApiModel(value = "IntegralOrder对象", description = "积分订单表")
public class IntegralOrder<T extends Model<?>> extends Model<T> implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "积分订单id")
	@TableId(value = "prize_order_id", type = IdType.ID_WORKER)
	private Long prizeOrderId;

	@ApiModelProperty(value = "商铺id")
	@TableField("shop_id")
	private String shopId;

	@ApiModelProperty(value = "积分商品id")
	@TableField("prize_id")
	private Long prizeId;


	@ApiModelProperty(value = "优惠券id")
	@TableField("coupon_id")
	private Long couponId;

	@ApiModelProperty(value = "优惠券类型")
	@TableField("coupon_type")
	private Integer couponType;

	@ApiModelProperty(value = "积分商品订单类型 (0.待发货 1.已发货 2.已完成)")
	@TableField("prize_order_status")
	private Integer prizeOrderStatus;

	@ApiModelProperty(value = "用户id")
	@TableField("user_id")
	private String userId;

	@ApiModelProperty(value = "用户头像")
	@TableField("member_avatar_url")
	private String memberAvatarUrl;

	@ApiModelProperty(value = "支付类型 100->余额支付;101->微信支付;102->好友代付;")
	@TableField("pay_type")
	private Integer payType;

	@ApiModelProperty(value = "支付时间")
	@TableField("pay_time")
	private LocalDateTime payTime;

	@ApiModelProperty(value = "用户微信名")
	@TableField("wxuser_name")
	private String wxuserName;

	@ApiModelProperty(value = "支付费用")
	@TableField("pay_fee")
	private BigDecimal payFee;

	@ApiModelProperty(value = "订单类型（0为积分商品 1为积分优惠卷）")
	@TableField("order_type")
	private Boolean orderType;

	@ApiModelProperty(value = "积分商品实际积分")
	@TableField("price")
	private BigDecimal price;

	@ApiModelProperty(value = "积分商品图片(下单时)")
	@TableField("integral_goods_pic")
	private String integralGoodsPic;

	@ApiModelProperty(value = "实付积分")
	@TableField("expend_integral")
	private BigDecimal expendIntegral;

	@ApiModelProperty(value = "收货人姓名")
	@TableField("receiver_name")
	private String receiverName;

	@ApiModelProperty(value = "收货地址")
	@TableField("address")
	private String address;

	@ApiModelProperty(value = "省级code")
	@TableField("province_code")
	private String provinceCode;

	@ApiModelProperty(value = "市级code")
	@TableField("city_code")
	private String cityCode;

	@ApiModelProperty(value = "区级code")
	@TableField("area_code")
	private String areaCode;


	@ApiModelProperty(value = "收货人电话")
	@TableField("tel_phone")
	private String telPhone;

	@ApiModelProperty(value = "物流单号")
	@TableField("delivery_sn")
	private String deliverySn;

	@ApiModelProperty(value = "物流公司")
	@TableField("delivery_company")
	private String deliveryCompany;

	@ApiModelProperty("集包地信息")
	@TableField("package_name")
	private String packageName;

	@ApiModelProperty("集包地信息")
	@TableField("package_code")
	private String packageCode;

	@ApiModelProperty("分拣码")
	@TableField("sorting_code")
	private String sortingCode;

	@ApiModelProperty(value = "邮费")
	@TableField("shipping_fee")
	private BigDecimal shippingFee;

	@ApiModelProperty(value = "配送方式(0.物流配送)目前只有物流配送 ")
	@TableField("distri_mode")
	private Integer distriMode;

	@ApiModelProperty(value = "配送信息")
	@TableField("delivery_staff")
	private String deliveryStaff;

	@ApiModelProperty(value = "积分商品名称")
	@TableField("integral_good_name")
	private String integralGoodName;


	@ApiModelProperty(value = "发货消息订阅")
	@TableField("delivery_template_id")
	private String deliveryTemplateId;

	@ApiModelProperty(value = "发货时间")
	@TableField("send_time")
	private LocalDateTime sendTime;


	@ApiModelProperty(value = "收货时间")
	@TableField("receive_time")
	private LocalDateTime receiveTime;


	@ApiModelProperty(value = "商家备注")
	@TableField("back_remark")
	private String backRemark;

	@ApiModelProperty(value = "买家留言")
	@TableField("buyers_note")
	private String buyersNote;

	@ApiModelProperty("租户ID")
	private String tenantId;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty("创建时间")
	@TableField(fill = FieldFill.INSERT)

	private LocalDateTime createTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty("更新时间")
	@TableField(fill = FieldFill.INSERT_UPDATE)


	private LocalDateTime updateTime;
	@TableLogic
	@ApiModelProperty("删除状态：0->未删除；1->已删除")
	@TableField(value = "is_deleted", fill = FieldFill.INSERT)
	private Boolean deleted;

}
